/*
 * @Date: 2019-02-04 23:57:04
 * @LastEditors: lipengxi 2899952565@qq.com
 * @LastEditTime: 2022-12-26 23:46:48
 * @FilePath: /vue-2.6.0/src/core/instance/index.js
 * @Description Vue增加一些混入方法
 */

import { initMixin } from './init'
import { stateMixin } from './state'
import { renderMixin } from './render'
import { eventsMixin } from './events'
import { lifecycleMixin } from './lifecycle'
import { warn } from '../util/index'


function Vue (options) {
  if (process.env.NODE_ENV !== 'production' &&
    !(this instanceof Vue)
  ) {
    warn('Vue is a constructor and should be called with the `new` keyword')
  }
  this._init(options)
}
// Vue原型上增加_init方法
initMixin(Vue)
// Vue原型增加 $data/$props/$set/$delete/$watch 方法
stateMixin(Vue)  
// Vue原型增加 $on/$emit/$once/$off 事件处理函数， 订阅发布模式
eventsMixin(Vue)
// _update/$forceUpdate/$destroy 生命周期方法
lifecycleMixin(Vue)
// $nextTick/_render方法
renderMixin(Vue)

export default Vue
